
#include <machine/asm.h>

ENTRY(memcmp)
	pushl	%esi
	pushl	%edi
	movl	12(%esp), %edi
	movl	16(%esp), %esi
	movl	20(%esp), %ecx
	xorl	%eax, %eax
	rep
	cmpsb
	popl	%edi
	popl	%esi
	ja	1f
	setnz %al
	ret
1:
	decl %eax
	ret
END(memcmp)
